package com.servicea.controller;

import com.sml.aop.sml.SMLLogAnnotation;
import com.sml.requset.ApiRequest;
import com.servicea.client.ServiceBFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author linlx
 * @Date 2021/8/8 16:36
 * @Description
 **/
@RestController
public class ServiceAController {

  @Autowired
  private ServiceBFeign serviceBFeign;

  @PostMapping("/testLog")
  @SMLLogAnnotation
  public void testLog(@RequestBody ApiRequest request) {
    serviceBFeign.testLog(request);
  }


  @PostMapping("/testLogThird")
  @SMLLogAnnotation
  public void testLogThird(@RequestBody ApiRequest request) {
    serviceBFeign.testLogThird(request);
  }

  @GetMapping("/exit")
  public void exit() {
    System.exit(0);
  }

}
